<?php
// 本类由系统自动生成，仅供测试用途
class IndexAction extends Action {
	
	//#########index
    public function index(){
    	header("Content-Type:text/html; charset=utf-8");
        header('location:admin.php');
    	// $qybscst=D('Qybscst');
     //    $arr_qybscsto=$qybscst->getqybscsto();$qybscsto=$arr_qybscsto['data'];
     //    $this->assign('qybscsto',$qybscsto);
    	// $this->display('getnopw');

	}

	public function dogetnopw(){
    	header("Content-Type:text/html; charset=utf-8");
    	$dtup=D('Dtup');

    	$alipayno=$_GET['alipayno'];
    	$qqno=$_GET['qqno'];

    	//先判断alipayno是否存在，这里需要一个大接口，假设先存在
    	$rslt_alipayno=1;//1代表OK

    	if($rslt_alipayno==1){
    		//从数据库里修改数据，并提取出来给用户
    		$arr_dt=$dtup->getnopw($alipayno,$qqno);$dt=$arr_dt['data'];
    		$rslt=$dt['rslt'];//0表示已经没有QQ企业号了 1表示有QQ企业号并给出数据
    		if($rslt==1){
    			$data['dtupo']=$dt['dtupo'];
    		}
    	}else{
    		$rslt=2;//找不到订单号
    	}

    	$data['rslt']=$rslt;
    	
    	$this->ajaxReturn($data,'json');

	}

    public function dogetnopwbyalipayno(){
        header("Content-Type:text/html; charset=utf-8");
        $dtup=D('Dtup');

        $alipayno=$_GET['alipayno'];
        
        
        $arr_dt=$dtup->getnopwbyalipayno($alipayno);$dt=$arr_dt['data'];
        
        $rslt=$dt['rslt'];

        if($rslt==1){$dtupo=$dt['dtupo'];$data['dtupo']=$dtupo;}
        

        $data['rslt']=$rslt;

        
        $this->ajaxReturn($data,'json');

    }
}